package com.tjmc.company.mapper;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tjmc.company.api.entity.CompanyInfoEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CompanyInfoMapper extends BaseMapper<CompanyInfoEntity> {
    /**
     * 查询会员企业列表
     * @param page 分页信息
     * @return
     */
    Page<CompanyInfoEntity> selectMemberCompanyPage(Page page);

    /**
     * 按类别查询企业列表
     * @param page 分页信息
     * @param category 类别
     * @return
     */
    Page<CompanyInfoEntity> selectCompanyPageByCategory(Page page, String category);

    /**
     * 分页条件查询
     * @param page
     * @param ew
     * @return
     */
    Page<CompanyInfoEntity> selectPageOrdered(Page page, @Param(Constants.WRAPPER) LambdaQueryWrapper ew);

    Long countBebrowsedNum(Long id);
}
